<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="CSS/style.css" rel="stylesheet" type="text/css" />
        <title>Adicionando um novo Cd</title>
    </head>
    <body style="background-color:#E2E4E4">
        <div class="header">
           <img src="Imagens/logo_musica.jpg" alt="musica" />
           
        </div>
        <ul id="menu-principal">
            <li><a href="index.jsp">Principal</a></li>
            <li><a href="mostrarDvdCads_2.jsp">Dvd</a></li>
            <li><a href="mostrarCdCads_2.jsp">Cd</a></li>           
            <li><a href="#">Contato</a></li>
            <li><a href="#">Restrito</a></li>
            <li><a href="FormInserindoDadosDvd.jsp">Cad.Dvd</a></li>
            <li><a href="FormInserindoDadosCd.jsp">Cad.Cd</a></li>
        </ul>
        <div class="conteudo">
        
        
        <table border ="1" cellpadding="2" cellpacing="0">
            <tr>
                <th>ID</th>
                <th>Nome</th>                
                <th>Gravadora</th>
                <th>Edicao</th>                
                <th>Editar Dvd</th>
                <th>Excluir Cd</th>
            </tr>
            
            <c:forEach var="lista" items="${requestScope.cdList}">
                <tr>    
                    <td>
                        
                    ${lista.id}
                </a>
            </td>
            <td>${lista.nome}</td>            
            <td>${lista.gravadora}</td>
            <td><fmt:formatDate value="${lista.edicao}"
                            type="DATE"
                            pattern="yyyy"/>
            </td>
            <td>
                <a href="ServletCds?cmd=atu&id=${lista.id}">                    
                Editar
                </a>
            </td>
            
            <td>
                <a href="ServletCds?cmd=exc&id=${lista.id}">
                Excluir
                </a>
            </td>
        </tr>
            </c:forEach>
        </table>
         <br />
          </div>
        <div class="footer">
              <p>Desenvolvido por Rosimeire Salzo</p>
        </div>
    </body>
</html>
